	function playerFrame() 
	{
		return document.getElementById('playerFrame');
	}
	
	function $(id) 
	{
		return document.getElementById(id);
	}
			
	function showplayer() {
		var o=$('playerFrame'); o.style.visibility='visible'; 			
		var o=$('showplayerBt'); o.style.display='none'; 
		var o=$('hideplayerBt'); o.style.display='block';
	}

	function hideplayer() {
		var o=$('playerFrame'); o.style.visibility='hidden'; 			
		var o=$('showplayerBt'); o.style.display='block'; 
		var o=$('hideplayerBt'); o.style.display='none';
	}

	function createIFRAME(url) {
		var r=new Array();
		var r=document.getElementsByTagName('iframe');
		for (t=0;t<r.length;t++) {if (r[t]) r[t].style.visibility='hidden';r[t].style.display='none'; try{r[t].parentNode.removeChild(r[t]);} catch(e) {};}
		
		//if (r) r.parentNode.removeChild(r);
		setTimeout("displayIFRAME('"+url+"');",500);
	}
	
	var nbIframes=0;
	function displayIFRAME(url) {
		nbIframes++;
		var r=document.createElement('iframe');
		r.setAttribute('id','player'+nbIframes);
		r.setAttribute('style',"frame-border:0; border:0; margin:0; padding:0; width:100%; height:100%; overflow:hidden");
		r.setAttribute('frameborder','0');
		r.setAttribute('scrolling','auto');
		r.setAttribute('bgcolor','#000000');
		r.setAttribute('width','100%');
		r.setAttribute('height','100%');
		document.getElementById('playerFrame').appendChild(r);
		if (url=="") url='play.php';
		setTimeout("document.getElementById('player"+nbIframes+"').src='"+url+"';",1000);

	}
	
	function toggleMenuSize() 
	{
		var r=parseInt(document.getElementById('menu').style.width); 
		if(isNaN(r)) r=20; 
		if(r!='20') 
		{
			document.getElementById('menu').style.width='20%';
			document.getElementById('playerFrame').style.left='20%';
			document.getElementById('playerFrame').style.width='80%';
		} 
		else 
		{
			document.getElementById('menu').style.width='0%';
			document.getElementById('playerFrame').style.left='0%';
			document.getElementById('playerFrame').style.width='100%';
		}
	}

	function clock() {
		var digital = new Date();
		var hours = digital.getHours();
		var minutes = digital.getMinutes();
		var seconds = digital.getSeconds();
		var amOrPm = "";
		if (hours > 11) amOrPm = "";
		if (hours <= 9) hours = "0" + hours;
		if (minutes <= 9) minutes = "0" + minutes;
		if (seconds <= 9) seconds = "0" + seconds;
		dispTime = hours + ":" + minutes + ":" + seconds + " " + amOrPm;
		document.getElementById('status').innerHTML = dispTime;
		setTimeout("clock()", 1000);
	}
